#include <REGX52.H>
#include "LCD1602.h"
#include "Delay.h"



void main()
{
	LCD_Init();
	LCD_ShowChar(1,1,0x41);
	LCD_ShowChar(1,2,'\'');	//想显示单引号，在里边写\' 反斜杠是转义字符
	LCD_ShowChar(1,3,'\"');	//双引号
	LCD_ShowChar(1,4,'\\');	//本来想输出\反斜杠的,但是变成¥了
//	LCD_ShowChar(1,5,'\¥');	//编译出错
//	LCD_ShowChar(2,3,'A');	//写0x41和'A' 效果一样
	
	
	LCD_ShowString(1,5,"Hello");
	LCD_ShowNum(1,12,66,2);
	LCD_ShowSignedNum(1,14,-88,2);
	LCD_ShowHexNum(2,1,0xA5,2);
	LCD_ShowBinNum(2,4,0xA5,8);
	LCD_ShowChar(2,13,0xDF);		//在2行13列显示编码为0xDF的字符
	LCD_ShowChar(2,14,'C');			//在2行14列显示字符C
	LCD_ShowChar(2,16,0xE0);		//在2行13列显示编码为0xE0的字符（α）
	
	//流动字幕的效果
	LCD_ShowString(1,16,"Welcome to China!");
	
	while(1)
	{
		LCD_WriteCommand(0x18);		//发送 移动的指令
 		Delay(500);
	}
	
}